{include file='common/head.html'}
<style>
	html,body,.layui-body {
		height: 100%;
	}
	.layui-body {
		padding: 0;
	}
	/*相关字段 @mk-关联字段用*/
    xm-select > .xm-body {
        z-index: 9999!important;
    }
</style>
<script type="text/javascript" src="{APP_THEME_DIR}/js/jquery.dragsort-0.5.2.min.js"></script>
<script src="{APP_THEME_DIR}/js/xm-select.js"></script>
<div class="layui-body">
	{if([$list])}
	<div class="layui-tab layui-tab-brief" lay-filter="tab">
	  <ul class="layui-tab-title">
	    <li class="layui-this" lay-id="t1">{$model_name}内容</li>
	  </ul>
	  <div class="layui-tab-content">
	  	   <div class="layui-tab-item layui-show">
	  	   		<form action="{url./admin/Single/index/mcode/'.get('mcode').'}" method="get" class="layui-form">
		  	   		<div class="layui-form-item nospace">
		  	   			<div class="layui-input-inline">
		  	   				{$pathinfo}
					       <select name="field" class="form-control input-sm" style="width:auto;">
					       		<option value="b.name" {if(get('field')=='b.name')}selected="selected" {/if}>栏目名称</option>
                                <option value="a.title" {if(get('field')=='a.title')}selected="selected" {/if} >文章标题</option>
                                <option value="a.content" {if(get('field')=='a.content')}selected="selected" {/if}>文章内容</option>
                        	</select>
					    </div>
	                     <div class="layui-input-inline">
	                     	<input type="text" name="keyword"  value="{$get.keyword}"  placeholder="请输入搜索关键字" class="layui-input">
	                     </div>
	                     <div class="layui-input-inline">
	                     	<button class="layui-btn" lay-submit onclick="submit();">搜索</button>
	                     	<a class="layui-btn layui-btn-primary"  href="{url./admin/Single/index/mcode/'.get('mcode').'}">清除搜索</a>
	                     </div>
	                </div>
                </form>

	            <table class="layui-table">
	            	<thead>
	                    <tr>
	                    	<th>ID</th>
	                        <th>栏目</th>
	                        <th>标题</th>
							<th width="50" style="text-align: center;">缩略图</th>
	                        <th>时间</th>
	                        <th>状态</th>
	                        <th>访问量</th>
	                        <th>操作</th>
	                    </tr>
	                </thead>
	                <tbody>
	                    {foreach $contents(key,value)}
	                    <tr>
	                    	<td>[value->id]</td>
	                        <td title="[value->scode]">[value->sortname]</td>
	                         <td title="[value->title]">
		                        {fun=substr_both($value->title,0,15)}
		                        {if($value->ico)}
		                        	<span class="layui-badge layui-bg-orange">缩</span>
		                        {/if}
		                        {if($value->pics)}
		                        	<span class="layui-badge">图</span>
		                        {/if}
		                        {if($value->outlink)}
	                            	<span class="layui-badge layui-bg-black">链</span>
	                            {/if}
	                        </td>
							<td style="text-align: center;">
								<div class="tit-ico">
									{if($value->ico)}
									<img src="{php}$ico=$value->ico;get_thumb($ico,200,200);{/php}" height="25px">
									<img class="stimg" data-src="[value->ico]" width="200">
									{else}
									<img src="{APP_THEME_DIR}/images/nopic.png" height="25px">
									{/if}
								</div>
							</td>
	                        <td>[value->date]</td>
	                        <td>
	                        {if($value->status)}
		                        <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/status/value/0}"><i class='fa fa-toggle-on' title="点击关闭"></i></a>
		                        {else}
		                        <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/status/value/1}"><i class='fa fa-toggle-off' title="点击开启"></i></a>
		                    {/if}
		                    </td>
		                    <td>[value->visits]</td>
	                        <td>
	                        	{if(!$value->outlink)}
		                        	{php}
		                        	 $value->urlname=$value->urlname?:'about';
		                        	 $url_rule_sort_suffix = \core\basic\Config::get('url_rule_sort_suffix') ? true : false;
		                        	{/php}
		                        	
		                           	{if($value->filename)}
		                        	<a href="{fun=homeurladmin('/home/Index/'.$value->filename,$url_rule_sort_suffix)}" class="layui-btn layui-btn-xs layui-btn-primary"  target="_blank">查看</a>
		                        	{else}
		                        	<a href="{fun=homeurladmin('/home/Index/'.$value->urlname.[$url_break_char].$value->scode,$url_rule_sort_suffix)}" class="layui-btn layui-btn-xs layui-btn-primary"  target="_blank">查看</a>
		                        	{/if}
	                        	{/if}
	                        	
	                            {if(check_level('mod'))}
	                            	<a href="{url./admin/Single/mod/mcode/'.$value->mcode.'/id/'.$value->id.'}{$btnqs}" class="layui-btn layui-btn-xs" >修改</a>
	                            	{if([$baidu_zz_token] && !$value->outlink)}
	                            		<a href="{url./admin/'.C.'/mod/baiduzz/'.$value->id.'}" class="layui-btn layui-btn-xs layui-btn-primary" >百度普通推送</a>
	                            	{/if}
	                            	{if([$baidu_ks_token] && !$value->outlink)}
	                            		<a href="{url./admin/'.C.'/mod/baiduks/'.$value->id.'}" class="layui-btn layui-btn-xs layui-btn-primary" >百度快速推送</a>
	                            	{/if}
	                            {/if}
	                        </td>
	                    </tr>
	                    {/foreach}
	                </tbody>
	            </table>
				<script>
					$(".tit-ico").hover(function(){
						$(this).find(".stimg").attr('src',$(this).find(".stimg").data("src"));
						$(this).find(".stimg").show();
					},function(){
						$(this).find(".stimg").hide();
					})
				</script>
	  	   </div>
	  </div>
	 </div>
	{/if} 
	
	{if([$mod])}
	
	<div class="layui-tab layui-tab-brief" lay-filter="tab">
	  <ul class="layui-tab-title">
	    <li class="layui-this">单页修改</li>
	  </ul>
	  <div class="layui-tab-content">
	  	<div class="layui-tab-item layui-show">
	  		<form action="{url./admin/Single/mod/id/'.[$get.id].'}{$backurl}" method="post" class="layui-form form-single" id="contentForm">
	  			<input type="hidden" name="formcheck" value="{$formcheck}" > 
	  			<div class="layui-tab">
					  <ul class="layui-tab-title">
					    <li class="layui-this">基本内容</li>
					    <li>高级内容</li>
					  </ul>
					  <div class="layui-tab-content">
					    <div class="layui-tab-item layui-show">
							<div class="layui-form-item">
								<label class="layui-form-label"><span class="layui-text-red">*</span> 内容标题</label>
								<div class="layui-input-block">
									<input type="text" name="title" required lay-verify="required" value="{$content->title}" placeholder="" class="layui-input input-title">
								</div>
							</div>
							{if([$field_subtitle])}
			                <div class="layui-form-item">
								<label class="layui-form-label">副标题</label>
								<div class="layui-input-block">
									<input type="text" name="subtitle" value="{$content->subtitle}" placeholder="" class="layui-input">
								</div>
							</div>
							{/if}

			                 {foreach $extfield(key,value)}
			                	{if($value->type==1)} <!-- 单行文本 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-block">
				                    	<input type="text" name="[value->name]" value="{$content->{$value->name}}"  placeholder=""  class="layui-input">
				                	</div>
				                </div>
			                	{/if}
			                	
			                	{if($value->type==2)}<!-- 多行文本 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-block">
				                		<textarea name="[value->name]" class="layui-textarea" placeholder="">{php}$name=$value->name;echo str_replace('<br>', "\r\n",$this->vars['content']->$name);{/php}</textarea>
				                	</div>
				                </div>
			                	{/if}
			                	
			                    {if($value->type==3)}<!-- 单选 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-block">
				                		<div>
	            						     {php}
				                				$radios=explode(',',$value->value);
				                				$name=$value->name;
				                				foreach ($radios as $value2) {
				                					if($this->vars['content']->$name==$value2){
	                									echo '<input type="radio" name="'.$value->name.'" value="'.$value2.'" title="'.$value2.'" checked>';
	                								}else{
	                									echo '<input type="radio" name="'.$value->name.'" value="'.$value2.'" title="'.$value2.'">';
	                								}
	            								}
	            						     {/php}
					                    </div>
				                	</div>
				                </div>
			                	{/if}
			                	
			                    {if($value->type==4)}<!-- 多选 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-block">
				                		<div>
	            						     {php}
				                				$checkboxs=explode(',',$value->value);
				                				$name=$value->name;
				                				echo '<input name="'.$value->name.'" type="hidden">';//占位清空
				                				$values=explode(',',$this->vars['content']->$name);
				                				foreach ($checkboxs as $value2) {
				                					if(in_array($value2,$values)){
	            										echo '<input type="checkbox" name="'.$value->name.'[]" value="'.$value2.'" title="'.$value2.'" checked>';
	            									}else{
	            										echo '<input type="checkbox" name="'.$value->name.'[]" value="'.$value2.'" title="'.$value2.'">';
	            									}
	            								}
	            						     {/php}
					                    </div>
				                	</div>
				                </div>
			                	{/if}
			                	
			                	{if($value->type==5)}<!-- 图片 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-inline">
				                     	<input type="text" name="[value->name]" id="[value->name]" value="{$content->{$value->name}}" placeholder=""  class="layui-input">
				                     </div>
				                     <button type="button" class="layui-btn upload watermark layui-btn-primary" data-des="[value->name]">
									 	 <i class="layui-icon">&#xe67c;</i>上传图片
									 </button>
                                     <a class="layui-btn layui-btn-warm" onclick="GetPictureFolder(1,'[value->name]');"><i class="layui-icon">&#xe64a;</i>图库</a>
									 {php}$name=$value->name; {/php}
									 <div id="[value->name]_box" class="pic">{if([$content]->$name)}<dl><dt><img src='{SITE_DIR}{$content->{$value->name}}' data-url="{$content->{$value->name}}"></dt><dd>删除</dd></dl>{/if}</div>
                                </div>
			                	{/if}
			                	
			                	{if($value->type==6)}<!-- 文件 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-inline">
				                     	<input type="text" name="[value->name]" id="[value->name]" value="{$content->{$value->name}}" placeholder=""  class="layui-input">
				                     </div>
				                     <button type="button" class="layui-btn file layui-btn-primary" data-des="[value->name]">
									 	 <i class="layui-icon">&#xe67c;</i>上传文件
									 </button>
				                </div>
			                	{/if}
			                	
			                	{if($value->type==7)}<!-- 日期 -->
				                <div class="layui-form-item">
				                     <label class="layui-form-label">[value->description]</label>
				                     <div class="layui-input-block">
				                     	<input type="text" name="[value->name]" value="{$content->{$value->name}}" readonly placeholder=""  class="layui-input datetime">
				                     </div>
				                </div>
			                	{/if}
			                	
			                	{if($value->type==8)}<!-- 编辑器 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-block">
			                			{php}
			                				$name=@$value->name;
			                			{/php}
				                		<script type="text/plain" id="editor_[value->name]" name="[value->name]" style="width:100%;height:240px;">{fun=decode_string([$content->$name])}</script>
				                		<script>
											//初始化编辑器
											$(document).ready(function (e) {
												var ue = UE.getEditor('editor_[value->name]',{
													maximumWords:10000 
												});
											})
										</script>
				                	</div>
				                </div>
			                	{/if}
			                	
			                	{if($value->type==9)}<!-- 下拉 -->
			                	<div class="layui-form-item">
			                		<label class="layui-form-label">[value->description]</label>
			                		<div class="layui-input-block">
			                			<select name="[value->name]">
			                				{php}
				                				$selects=explode(',',$value->value);
				                				$name=$value->name;
				                				foreach ($selects as $value2) {
				                					if($this->vars['content']->$name==$value2){
				                						echo '<option value="'.$value2.'" selected>'.$value2.'</option>';
	                								}else{
	                									echo '<option value="'.$value2.'">'.$value2.'</option>';
	                								}
	            								}
	            						    {/php}
			                			</select>
				                	</div>
				                 </div>
			                	 {/if}

			                	{if($value->type==10)}
			                	<!-- 多图 -->
			                	<div class="layui-form-item">
			                	    <label class="layui-form-label">[value->description]</label>
			                	    <input type="hidden" name="[value->name]" id="pics_[value->name]" placeholder="" class="layui-input">
			                	    <button type="button" class="layui-btn uploads layui-btn-primary" data-des="pics_[value->name]">
			                	        <i class="layui-icon">&#xe67c;</i>上传多图
			                	    </button>
                                    <a class="layui-btn layui-btn-warm" onclick="GetPictureFolder(100,'pics_[value->name]');"><i class="layui-icon">&#xe64a;</i>图库</a>
			                	    <div id="pics_[value->name]_box" class="pic addedit add_pics">
			                	        <dl></dl> <!-- 规避空内容拖动bug -->
			                	        {php}$name=$value->name; {/php}
			                	        {php}
			                	        if([$content]->$name){
			                	        $pics=unserialize([$content]->$name);
			                	        }else{
			                	        $pics = array();
			                	        }
			                	        foreach ($pics as $key=>$value) {
			                	        echo "<dl><dt><img src='".SITE_DIR.$value[src]."' data-url='".$value[src]."' data-alt='".$value[alt]."'></dt>
			                	            <p><input type='text' class='form-control input-sm' placeholder='图片地址' name='img_pics_".$name."_src[]' value='".$value[src]."' size='30'></p>
			                	            <p><input type='text' class='form-control input-sm' placeholder='图片注释' name='img_pics_".$name."_alt[]' value='".$value[alt]."' size='30'></p>
			                	            <p style='display:none;'><textarea class='form-control input-sm' placeholder='图片描述' name='img_pics_".$name."_desc[]'>".$value[desc]."</textarea></p>
			                	            <dd>删除</dd>
			                	        </dl>";
			                	        }
			                	        {/php}
			                	    </div>
			                	    <script type="text/javascript">
			                	    $("#pics_{php}echo $name;{/php}_box").dragsort({
			                	                dragSelector: "dl",
			                	                dragBetween: false,
			                	                dragSelectorExclude: "input,textarea,dd",
			                	                dragEnd: saveOrder_{php}echo $name;{/php},
			                	                    placeHolderTemplate: "<dl class='placeHolder'><dt></dt></dl>"
			                	                });

			                	            function saveOrder_{php}echo $name;{/php}() {
			                	                var data = $("#pics_{php}echo $name;{/php}_box dl dt img").map(function() {
			                	                    return $(this).data("url");
			                	                }).get();
			                	            };
			                	    </script>
			                	</div>
			                	{/if}

			                	{if($value->type==13)}
			                	<!-- 多图 -->
			                	<div class="layui-form-item">
			                	    <label class="layui-form-label">[value->description]</label>
			                	    <input type="hidden" name="[value->name]" id="pics_[value->name]" placeholder="" class="layui-input">
			                	    <button type="button" class="layui-btn uploads layui-btn-primary" data-des="pics_[value->name]">
			                	        <i class="layui-icon">&#xe67c;</i>上传多图
			                	    </button>
                                    <a class="layui-btn layui-btn-warm" onclick="GetPictureFolder(100,'pics_[value->name]');"><i class="layui-icon">&#xe64a;</i>图库</a>
			                	    <div id="pics_[value->name]_box" class="pic addedit add_pics add_pics_desc">
			                	        <dl></dl> <!-- 规避空内容拖动bug -->
			                	        {php}$name=$value->name; {/php}
			                	        {php}
			                	        if([$content]->$name){
			                	        $pics=unserialize([$content]->$name);
			                	        }else{
			                	        $pics = array();
			                	        }
			                	        foreach ($pics as $key=>$value) {
			                	        echo "<dl><dt><img src='".SITE_DIR.$value[src]."' data-url='".$value[src]."' data-alt='".$value[alt]."'></dt>
			                	            <p><input type='text' class='form-control input-sm' placeholder='图片地址' name='img_pics_".$name."_src[]' value='".$value[src]."' size='30'></p>
			                	            <p><input type='text' class='form-control input-sm' placeholder='图片注释' name='img_pics_".$name."_alt[]' value='".$value[alt]."' size='30'></p>
			                	            <p><textarea class='form-control input-sm' placeholder='图片描述' name='img_pics_".$name."_desc[]'>".$value[desc]."</textarea></p>
			                	            <dd>删除</dd>
			                	        </dl>";
			                	        }
			                	        {/php}
			                	    </div>
			                	    <script type="text/javascript">
			                	    $("#pics_{php}echo $name;{/php}_box").dragsort({
			                	                dragSelector: "dl",
			                	                dragBetween: false,
			                	                dragSelectorExclude: "input,textarea,dd",
			                	                dragEnd: saveOrder_{php}echo $name;{/php},
			                	                    placeHolderTemplate: "<dl class='placeHolder'><dt></dt></dl>"
			                	                });

			                	            function saveOrder_{php}echo $name;{/php}() {
			                	                var data = $("#pics_{php}echo $name;{/php}_box dl dt img").map(function() {
			                	                    return $(this).data("url");
			                	                }).get();
			                	            };
			                	    </script>
			                	</div>
			                	{/if}

			                	<!-- @mk-关联字段用 -->
			                	{if($value->type==11)}
                                <!-- 单选相关 -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">[value->description]</label>
                                    <div class="layui-input-block">
                                        <div>
                                            {php}
                                            $related=explode(',',$value->value);
                                            $contents = get_list($related[0],$related[1]);
                                            $name=$value->name;
                                            echo '<input name="'.$value->name.'" type="hidden">';//占位清空
                                            $values=explode(',',$this->vars['content']->$name);
                                            foreach ($contents as $value2) {
                                            if(in_array($value2->id,$values)){
                                            echo '<input type="radio" name="'.$value->name.'[]" value="'.$value2->id.'" title="'.$value2->title.'" checked>';
                                            }else{
                                            echo '<input type="radio" name="'.$value->name.'[]" value="'.$value2->id.'" title="'.$value2->title.'">';
                                            }
                                            }
                                            {/php}
                                        </div>
                                    </div>
                                </div>
                                {/if}
                                {if($value->type==12)}
                                <!-- 多选相关 -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">[value->description]</label>
                                    <input type="hidden" name="[value->name]" id="[value->name]-value" value="{$content->{$value->name}}">
                                    <div class="layui-input-block">
                                        <div id="[value->name]" class="xm-select-demo"></div>
                                    </div>
                                    <script>
                                        var [value->name] = xmSelect.render({
    			                	        el: '#[value->name]',
    			                	        language: 'zn',
    			                	        filterable: true,
    			                	        on: function(data){
    			                	            var arr = data.arr;
    			                	            var str='';
    			                	            for(j = 0,len=arr.length; j < len; j++) {
    			                	               str+=arr[j]['value']+','
    			                	            }
    			                	            $("#[value->name]-value").val(str);
    			                	        },
    			                	        initValue: [
    			                	            {php}
    			                	            $name2=$value->name;
    			                	            echo $this->vars['content']->$name2;
    			                	            {/php}
    			                	        ],
    			                	        data: [
    			                	            {php}
    			                	            $related=explode(',',$value->value);
    			                	            $contents = get_list($related[0],$related[1]);
    			                	            $name=$value->name;
    			                	            $values=explode(',',$this->vars['content']->$name);
    			                	            foreach ($contents as $value2) {
    			                	            echo '{name: "'.$value2->title.'", value: "'.$value2->id.'"},';
    			                	            }
    			                	            {/php}
    			                	        ]
    			                	    })
    			                	</script>
                                </div>
                                {/if}
			                	 
			                {/foreach}
			                
			                <div class="layui-form-item">
			                     <label class="layui-form-label">内容</label>
			                     <div class="layui-input-block">
			                     	<script type="text/plain" id="editor" name="content" style="width:100%;height:240px;">{fun=decode_string([$content->content])}</script>
			                     </div>
			                </div>
			                			                
			                <div class="layui-form-item">
			                     <label class="layui-form-label">缩略图</label>
			                     <div class="layui-input-inline">
			                     	<input type="text" name="ico" id="ico" value="{$content->ico}" placeholder=""  class="layui-input">
			                     </div>
			                     <button type="button" class="layui-btn upload watermark layui-btn-primary" data-des="ico">
								 	 <i class="layui-icon">&#xe67c;</i>上传图片
								 </button>
                                 <a class="layui-btn layui-btn-warm" onclick="GetPictureFolder(1,'ico');"><i class="layui-icon">&#xe64a;</i>图库</a>
								 <div id="ico_box" class="pic addedit">{if([$content->ico])}<dl><dt><img src="{SITE_DIR}{$content->ico}" data-url="{$content->ico}"></dt><dd>删除</dd></dl>{/if}</div>
			                </div>
			                {if([$field_pics])}
			                <div class="layui-form-item">
			                     <label class="layui-form-label">轮播多图</label>
			                     <input type="hidden" name="pics" id="pics" placeholder="" class="layui-input">
			                     <button type="button" class="layui-btn uploads watermark layui-btn-primary" data-des="pics">
								 	 <i class="layui-icon">&#xe67c;</i>上传多图
								 </button>
                                 <a class="layui-btn layui-btn-warm" onclick="GetPictureFolder(100,'pics');"><i class="layui-icon">&#xe64a;</i>图库</a>
								 <div id="pics_box" class="pic addedit add_pics">
								     <dl></dl> <!-- 规避空内容拖动bug -->
								     {php}
								     if([$content->pics]){
								     $pics=unserialize([$content->pics]);
								     }else{
								     $pics = array();
								     }
								     foreach ($pics as $key=>$value) {
								     echo "<dl><dt><img src='".SITE_DIR.$value[src]."' data-url='".$value[src]."' data-alt='".$value[alt]."'></dt>
								         <p><input type='text' class='form-control input-sm' placeholder='图片地址' name='img_pics_src[]' value='".$value[src]."' size='30'></p>
								         <p><input type='text' class='form-control input-sm' placeholder='图片注释' name='img_pics_alt[]' value='".$value[alt]."' size='30'></p>
								         <dd>删除</dd>
								     </dl>";
								     }
								     {/php}
								 </div>
			                </div>
							{/if}
			                
					    </div>
					    
					    <div class="layui-tab-item ">
					    
							<input type="hidden" name="titlecolor" value="{$content->titlecolor}" placeholder=""  class="layui-input jscolor {hash:true}">

			                
							{if([$field_enclosure])}
							<div class="layui-form-item">
		                		<label class="layui-form-label">附件</label>
		                		<div class="layui-input-inline">
			                     	<input type="text" name="enclosure" id="enclosure" value="{$content->enclosure}" placeholder=""  class="layui-input">
			                     </div>
			                     <button type="button" class="layui-btn file layui-btn-primary" data-des="enclosure">
								 	 <i class="layui-icon">&#xe67c;</i>上传附件
								 </button>
			                </div>
							{/if}

							<input type="hidden" name="tags" placeholder="每个TAG标签之间用英文逗号隔开" value="{$content->tags}" class="layui-input">

			                 <div class="layui-form-item">
			                      <label class="layui-form-label">作者</label>
			                      <div class="layui-input-inline">
			                      	<input type="text" name="author" placeholder="" value="{$content->author}" class="layui-input">
			                      </div>
			                 </div>

							 {if([$field_source])}
							 <div class="layui-form-item">
			                      <label class="layui-form-label">来源</label>
			                      <div class="layui-input-inline">
			                      	<input type="text" name="source" placeholder="" value="{$content->source}" class="layui-input">
			                      </div>
			                 </div>
							{/if}
			                 
			                 

			                 <div class="layui-form-item">
			                     <label class="layui-form-label">发布时间</label>
			                     <div class="layui-input-inline">
			                     	<input type="text" name="date" value="{$content->date}" readonly placeholder=""  class="layui-input datetime">
			                     </div>
			                     <div class="layui-form-mid layui-word-aux">温馨提示：单页不支持定时发布！</div>
			                </div>
			                
			                <input type="hidden" name="keywords" value="{$content->keywords}"  placeholder="" class="layui-input">
			                
			                <textarea name="description" placeholder="" class="layui-textarea" style="display: none;">&nbsp;</textarea>
			                
			                <div class="layui-form-item">
			                     <label class="layui-form-label">状态</label>
			                     <div class="layui-input-block">
			                     	<input type="radio" name="status" value="1" title="显示" {if([$content->status]==1)} checked="checked"{/if}>
									<input type="radio" name="status" value="0" title="隐藏" {if([$content->status]==0)} checked="checked"{/if}>
			                     </div>
			                </div>
					    </div>
					  </div>
					</div>
					<div class="layui-form-item">
						 <div class="layui-input-block">
						    <button class="layui-btn" lay-submit>立即提交</button>
						    
						 </div>
					</div>
	  		</form>
	  	</div>
	  </div>
	</div>
	{/if} 

</div>

<style>.placeHolder {border:dashed 2px gray; }</style>
<script type="text/javascript">
$("#pics_box").dragsort({
	dragSelector: "dl",
	dragSelectorExclude: "input,textarea,dd",
	dragBetween: false,
	dragEnd: saveOrder,
	placeHolderTemplate: "<dl class='placeHolder'><dt></dt></dl>"
});

function saveOrder() {
	var data = $("#pics_box dl dt img").map(function() {
		return $(this).data("url");
	}).get();
	$("input[name=pics]").val(data.join(","))
};
</script>
<script type="text/javascript" src="{APP_THEME_DIR}/js/jscolor.js"></script>

{include file='common/ueditor.html'}
{include file='common/foot.html'}
